Occurrence of a Character in a String in Python